<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<title>特色专题</title>
		<link href="../../plugins/mui/mui.min.css" rel="stylesheet"/>
		<link rel="stylesheet" type="text/css" href="../../css/index/tourist.css"/>
		<script src="../../js/statistics.js"></script>
		<script src="../../js/fontset.js"></script>
	</head>
	<body>
		<header class="mui-bar mui-bar-nav header">
			<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
		    <h1 class="mui-title">特色专题</h1>
		</header>
		<div class="mui-content topic">
			<div class="topic-list" id="list">
				<!--<a href="javascript:void(0);" data-href="../index/tourist.html">
					<img src="../../images/city/topic-1.png" alt="茶叶节" />
					<p>asdqwdqwdqw</p>
				</a>
				<a href="javascript:void(0);" data-href="../index/tourist.html">
					<img src="../../images/city/topic-1.png" alt="茶叶节" />
					<p>大神都去无多asdqwdqwdqwdqaaaaaaaaaaaaaaaaaaaaaaaaa</p>
				</a>-->
			</div>
		</div>
		<script src="../../plugins/mui/mui.min.js"></script>
		<script src="../../js/life_housekeeper/windowTitleView.js"></script>
		<script src="../../js/getApiToken.js"></script>
		<script src="../../js/md5.js"></script>
		<script src="../../plugins/template/template.js"></script>
		<script type="text/html" id="topic-list">
			{{each data as value i}}
			<a href="javascript:void(0);" data-id="{{value.id}}" title="{{value.title}}">
				<img src="{{baseUrl}}{{value.images}}" alt="茶叶节" />
				<p>{{value.title}}</p>
			</a>	
			{{/each}}
		</script>
		<script type="text/javascript">
			mui.init();
			mui.plusReady(function(){
				myAjax('home/feature/getList','get',{},function(data){
					console.log(data)
    					var list = {
    						data:JSON.parse(data),
    						baseUrl:_baseUrl
    					};
    					var html = template('topic-list',list);
    					document.getElementById("list").innerHTML = html;
				});
				mui(".topic-list").on('tap','a',function(){
					var topicId = this.getAttribute("data-id"),
						title = this.getAttribute("title");
					var viewOptions = {
						url:'../index/tourist.html',
						id:'tourist.html'
					};
					var extras = {
						'topicId':topicId,
						'title':title
					}
					mui.addTitleView(viewOptions,extras);
				})
				
			});
		</script>
	</body>
	
</html>
